<?php

namespace App\Admin\Controllers;

use App\Admin\Metrics\Examples;
use App\Http\Controllers\Controller;
use App\Services\WuKongImService;
use Dcat\Admin\Admin;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Widgets\Card;
use Dcat\Admin\Layout\Row;

class DashboardController extends Controller
{
    public function index(Content $content)
    {
        return $content
            ->header('Dashboard')
            ->description('Description...')
            ->body(function (Row $row) {
                $row->column(8, function (Column $column) {
                    $column->row(function (Row $row) {
//                        $card = Card::make(view('...'));
                        $card = Card::make('', view('Dashboard.card1',['name'=>Admin::user()->name])->with('style', 'height: 300px;'));

// 设置间距
                        $card->padding('0');

// 设置工具按钮
//                        $card->tool('<button class="btn btn-sm btn-light shadow-none">按钮</button>');

// 设置底部内容
//                        $card->footer(phpversion());
                        $row->column(12, $card);
                    });
//                    $column->row(function (Row $row) {
//                        $row->column(12, new Examples\NewUsers());
//                    });
//                    $column->row(function (Row $row) {
//                        $row->column(4, new Examples\NewUsers());
//                        $row->column(4, new Examples\NewUsers());
//                        $row->column(4, new Examples\NewUsers());
//                    });
//                    $column->row(function (Row $row) {
//                        $row->column(12, new Examples\NewUsers());
//                    });
//                    $column->row(function (Row $row) {
//                        $row->column(6, new Examples\NewUsers());
//                        $row->column(6, new Examples\NewUsers());
//                    });
                });

                $row->column(4, function (Column $column) {
//                    $column->row(function (Row $row) {
//                        $row->column(12, new Examples\NewUsers());
//                    });
//                    $column->row(function (Row $row) {
//                        $row->column(12, new Examples\NewUsers());
//                    });
//                    $column->row(function (Row $row) {
//                        $row->column(12, new Examples\NewUsers());
//                    });
//                    $column->row(function (Row $row) {
//                        $row->column(12, new Examples\NewUsers());
//                    });


                });
            });

    }
}
